/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JPanel_BusCard.java
 *
 * Created on Jun 21, 2009, 9:55:56 AM
 */

package doanlythuyet_javaoutlook.MyUserControl;

import BUS.MyContactBUS;
import DTO.MyContactDTO;
import java.io.IOException;
import java.sql.SQLException;

/**
 *
 * @author Administrator
 */
public class JPanel_BusCard extends javax.swing.JPanel {

    /** Creates new form JPanel_BusCard */
    public JPanel_BusCard() {
        initComponents();
    }

    public void HienThiThongTin(int i) throws SQLException, IOException {
        MyContactDTO contactDTO = new MyContactBUS().layTatCaContactBangID(i);
        jLabel_Email.setText(contactDTO.getM_Email());
        jLabel_Ten.setText(contactDTO.getM_Ten());
        jLabel_CongTy.setText(contactDTO.getM_CongTy());
        jLabel_DienThoai.setText(contactDTO.getM_DienThoai());
        jLabel_DiaChi.setText(contactDTO.getM_DiaChi());
        jLabel_CongTy1.setText(contactDTO.getM_NickName());
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel_CongTy = new javax.swing.JLabel();
        jLabel_Email = new javax.swing.JLabel();
        jLabel_DienThoai = new javax.swing.JLabel();
        jLabel_DiaChi = new javax.swing.JLabel();
        jLabel_Ten = new javax.swing.JLabel();
        jPanel_Nick = new javax.swing.JPanel();
        jLabel_CongTy1 = new javax.swing.JLabel();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(doanlythuyet_javaoutlook.DoAnLyThuyet_JavaOutLookApp.class).getContext().getResourceMap(JPanel_BusCard.class);
        setBackground(resourceMap.getColor("Form.background")); // NOI18N
        setBorder(new javax.swing.border.LineBorder(resourceMap.getColor("Form.border.lineColor"), 3, true)); // NOI18N
        setMaximumSize(new java.awt.Dimension(200, 150));
        setName("Form"); // NOI18N
        setPreferredSize(new java.awt.Dimension(200, 150));

        jLabel_CongTy.setText(resourceMap.getString("jLabel_CongTy.text")); // NOI18N
        jLabel_CongTy.setName("jLabel_CongTy"); // NOI18N

        jLabel_Email.setText(resourceMap.getString("jLabel_Email.text")); // NOI18N
        jLabel_Email.setName("jLabel_Email"); // NOI18N

        jLabel_DienThoai.setText(resourceMap.getString("jLabel_DienThoai.text")); // NOI18N
        jLabel_DienThoai.setName("jLabel_DienThoai"); // NOI18N

        jLabel_DiaChi.setText(resourceMap.getString("jLabel_DiaChi.text")); // NOI18N
        jLabel_DiaChi.setName("jLabel_DiaChi"); // NOI18N

        jLabel_Ten.setFont(resourceMap.getFont("jLabel_Ten.font")); // NOI18N
        jLabel_Ten.setText(resourceMap.getString("jLabel_Ten.text")); // NOI18N
        jLabel_Ten.setName("jLabel_Ten"); // NOI18N

        jPanel_Nick.setBackground(resourceMap.getColor("jPanel_Nick.background")); // NOI18N
        jPanel_Nick.setName("jPanel_Nick"); // NOI18N

        jLabel_CongTy1.setText(resourceMap.getString("jLabel_CongTy1.text")); // NOI18N
        jLabel_CongTy1.setName("jLabel_CongTy1"); // NOI18N

        javax.swing.GroupLayout jPanel_NickLayout = new javax.swing.GroupLayout(jPanel_Nick);
        jPanel_Nick.setLayout(jPanel_NickLayout);
        jPanel_NickLayout.setHorizontalGroup(
            jPanel_NickLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_NickLayout.createSequentialGroup()
                .addComponent(jLabel_CongTy1, javax.swing.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)
                .addGap(184, 184, 184))
        );
        jPanel_NickLayout.setVerticalGroup(
            jPanel_NickLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel_CongTy1)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jLabel_CongTy, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel_Ten))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jLabel_Email, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel_DienThoai, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel_DiaChi)))
                .addContainerGap(174, Short.MAX_VALUE))
            .addComponent(jPanel_Nick, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel_Nick, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel_Ten)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel_CongTy)
                .addGap(26, 26, 26)
                .addComponent(jLabel_DienThoai)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel_Email)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel_DiaChi)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel_CongTy;
    private javax.swing.JLabel jLabel_CongTy1;
    private javax.swing.JLabel jLabel_DiaChi;
    private javax.swing.JLabel jLabel_DienThoai;
    private javax.swing.JLabel jLabel_Email;
    private javax.swing.JLabel jLabel_Ten;
    private javax.swing.JPanel jPanel_Nick;
    // End of variables declaration//GEN-END:variables

}
